#ifndef GDEF_H
#define GDEF_H

	#include "memory.h"

	#define TYPE_INSTRUCTION		0x80000000

	#define TYPE_REGISTER			0x40000000
	#define TYPE_REG08				1 | TYPE_REGISTER
	#define TYPE_REG16				2 | TYPE_REGISTER
	#define TYPE_REG32				3 | TYPE_REGISTER

	#define TYPE_IMMEDIATE			0x20000000

	#define TYPE_CONSTANT			0x10000000 | TYPE_IMMEDIATE

	#define TYPE_NUMBER				0x08000000 | TYPE_CONSTANT
	#define TYPE_NUMBER_DECIMAL		1 | TYPE_NUMBER
	#define TYPE_NUMBER_BINARY		2 | TYPE_NUMBER
	#define TYPE_NUMBER_HEXA		3 | TYPE_NUMBER
	
	#define TYPE_STRING				0x04000000 | TYPE_CONSTANT

	#define TYPE_DIRECTIVE			0x02000000

	#define TYPE_LABEL				0x01000000
	#define TYPE_LABEL_GLOBAL		1 | TYPE_LABEL
	#define TYPE_LABEL_LOCAL		2 | TYPE_LABEL

	#define TYPE_DATADEF			0x00800000
	#define TYPE_DATADEF_STRUCT		1 | TYPE_DATADEF

	#define TYPE_MACRO				0x00400000

	#define TYPE_OPERATOR			0x00200000


	const static char *str_registers[] = { "eax", "ebx" };

	typedef struct INSTR
	{
		char* str;
		int  argc;
	} INSTR;

	const static INSTR instructions[] = { 
		{ "add", 2 },
		{ "mov", 2 } };

#endif
